<?php

class Application_Model_ElementKosarice
{
            protected $_kolicina;
            protected $_kosarica_sifra_kosarice;
            protected $_produkt_idprodukt;
            
    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
    
    
    public function __set($name, $value)
    {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid product property');
        }
        $this->$method($value);
    }
    
        public function __get($name)
    {
        $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid product property');
        }
        return $this->$method();
    }
        public function setOptions(array $options)
    {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }
        public function setProdukt_idprodukt($produkt_idprodukt)
    {
        $this->_produkt_idprodukt = $produkt_idprodukt;
        return $this;
    }

    public function getProdukt_idprodukt()
    {
        return $this->_produkt_idprodukt;
    }
    
        public function setKolicina($kolicina)
    {
        $this->_kolicina = $kolicina;
        return $this;
    }

    public function getKolicina()
    {
        return $this->_kolicina;
    }
    
        public function setKosaricaSifraKosarice($kosarica_sifra_kosarice)
    {
        $this->_kosarica_sifra_kosarice = $kosarica_sifra_kosarice;
        return $this;
    }

    public function getKosaricaSifraKosarice()
    {
        return $this->_kosarica_sifra_kosarice;
    }
}

